Fix Android build: upgrade to SDK 35, AGP 8.7.3, and Glance widget API#45
Draft
Fix Android build: upgrade to SDK 35, AGP 8.7.3, and Glance widget API#45
Conversation
…sage - Upgraded AGP from 8.5.2 to 8.7.3 to support compileSdk 35 - Updated compileSdk, targetSdk to 35 (minSdk remains 24) - Built web app and ran npx cap sync to regenerate Capacitor files - Removed composeOptions.kotlinCompilerExtensionVersion (Kotlin 2.0+ auto-manages) - Fixed duplicate splash resource (removed splash.png, kept splash.xml) - Added missing color resource (splashBackground) and string (title_activity_main) - Fixed theme reference from @android:style to @Style - Installed and configured Java 21 for Capacitor compatibility - Updated Glance widget API calls to use GlanceAppWidgetManager - Fixed actionStartActivity to pass Intent parameter - Build now completes successfully with assembleDebug Co-authored-by: LuminLynx <212206643+LuminLynx@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Android build errors related to AAR metadata
Fix Android build: upgrade to SDK 35, AGP 8.7.3, and Glance widget API
Dec 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Android build was failing due to AAR metadata incompatibility -
androidx.core:core-ktx:1.15.0requires compileSdk 35, but AGP 8.5.2 only supports up to SDK 34. Additionally, Glance widget API calls were using internal methods that are no longer accessible.SDK and Tooling Upgrades
composeOptions.kotlinCompilerExtensionVersion- auto-managed by Kotlin 2.0+ Compose pluginGlance Widget API Migration
Previous internal API calls are no longer accessible:
Also updated
actionStartActivity<MainActivity>()toactionStartActivity(Intent(context, MainActivity::class.java)).Resource Fixes
splash.png(conflicts withsplash.xml)splashBackgroundcolor andtitle_activity_mainstring@android:style/Theme.Material3.DayNight→@style/Theme.Material3.DayNightBuild Process
Capacitor sync now correctly generates
capacitor-cordova-android-plugins/cordova.variables.gradleafter web app build.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.